Repository navigation
fix(api): use keyword search for economy datasets in hit testing - #44895
Merged
JohnJyong merged 3 commits intoOct 29, 2026
Merged
Conversation
Contributor
Pyrefly Type Coverage
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #44895 +/- ##
=======================================
Coverage 89.54% 89.54%
=======================================
Files 6011 6011
Lines 377077 377078 +1
Branches 76340 76340
=======================================
+ Hits 337662 337669 +7
+ Misses 33421 33414 -7
- Partials 5994 5995 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
JohnJyong
approved these changes
Oct 28, 2026
JohnJyong
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the complete diff and traced the console/Service API entry points, retrieval dispatch, and existing economy-dataset behavior. No issues found.
Validated on this head: 84 targeted tests passed across hit-testing service, retrieval service, and console/Service API controller tests; Ruff check and format check passed. Current backend unit, controller, integration, and Python-style CI checks are green.
JohnJyong
enabled auto-merge
October 28, 2026 16:59
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Fixes #<issue number>.Summary
Fixes #44894
HitTestingService.retrievenow checks the dataset's indexing technique before choosing the search method. Economy datasets always use keyword search; other datasets still use the requested or configuredsearch_methodas before.This matches
DatasetRetrieval(chat apps and workflows) and the console hit-testing page, which already force keyword search for economy datasets. Economy datasets have no vector index, so this also applies when a caller explicitly requestssemantic_search.Tests
Added a parametrized test in
test_hit_testing_service.pythat checks theretrieval_methodpassed toRetrievalService.retrieve:retrieval_modelkeyword_searchsemantic_searchkeyword_searchsemantic_searchThe two economy cases fail without the fix; the high-quality case is a control and passes before and after.
Screenshots
POST /v1/datasets/<id>/retrievewith onlyqueryon an economy dataset returns 400Default model not found for text-embeddingChecklist
make lint && make type-check(backend) andvp staged(frontend) to appease the lint gods